package org.ym.thread;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;

/**
 * @author ym
 */
@SpringBootApplication(scanBasePackages = {"org.ym"})
@Slf4j
public class ThreadApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(ThreadApplication.class,args);
        Environment env = context.getEnvironment();
        log.error("\n----------------------------------------------------------\n\t" +
                        "Application '{}' is running! \n\t" +
                        "Access URLs:\n\t" +
                        "Local: \t\thttp://localhost:{}\n\t" +
                        "----------------------------------------------------------",
                env.getProperty("spring.application.name"),
                env.getProperty("server.port"));
    }
}
